<template>
  <a-modal :open="open" :width="1080" title="中草药" centered @cancel="onCancel">
    <baseTable
      :loading="loading"
      column-code="000464"
      fill
      :data-source="tableData"
      bordered
      :scroll="{ x: 810 }"
      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
    >
      <template #bodyCell="{ column }">
        <template v-if="column.dataIndex === 'action'">
          <a-button type="link" size="small" @click="onClickEdit()"> 修改 </a-button>
        </template>
      </template>
    </baseTable>
  </a-modal>
</template>
<script setup>
// const props =
const selectedRowKeys = ref([])
const tableData = ref([
  {
    type: '1',
    num: '2',
    memo: '测试'
  }
])
const loading = ref(false)
defineProps({
  open: Boolean
})
const emit = defineEmits(['update:open'])
const onCancel = () => {
  emit('update:open', false)
}

const onSelectChange = (select) => {
  selectedRowKeys.value = select
}
</script>
<style lang="less" scoped>
.active-li {
  border: 1px solid var(--primary-color);
}
</style>
